Skip to contentSkip to conversation

bluetooth remote control

Bluez-users deva seetharam 3 participants 4 messages Apr 11, 2006 – Apr 12, 2006 Bluetooth drivers

lore
Share & tools
lore
#0 lore raw

hello all,
i am building bluetooth based handheld remote control devices.

background information
===============
the remote control devices are based on LMX9820 (National Semiconductor's single-chip bluetooth modules). when buttons are pressed, these devices send messages to an application running on a debian linux box. bluetooth connectivity is added to this linux box using D-Link DBT-120 bluetooth dongle.

attempted architectures
==============
i tried to implement this system using the following architectures:

1. RFCOMM server
the linux box runs a bluetooth socket server on a particular channel. the remote control device connects to the server over the specific channel and sends messages.

problems encountered: multiple remotes can't connect to the same server.

i see that the accept method (unlike tcp implementation) returns the server port upon accepting an incoming connection. for instance, if the server is listening on port 16, when any remote connects to the server, the server port 16 is used to establish end-to-end connection with the client. now, another device cannot connect to the same server until the first remote disconnects. this problem stops us from using multiple remotes with a single linux server.

2. Serial port
set up one or more bluetooth serial ports and the remote control devices can send messages to anyone of them by randomly selecting one of those channels.

so i setup a port as listed by rfcomm show:
rfcomm0: 00:0D:88:C0:61:55 channel 16 clean

Quoted 1 line

sdptool add --channel=16 sp

Serial Port service registered

Quoted 1 line

rfcomm listen 0 16

Waiting for connection on channel 16

i tried to connect to rfcomm0 from a *different* linux machine.

problems encountered: can't connect...

Quoted 1 line

rfcomm connect 00:0D:88:C0:61:55 16

Can't connect RFCOMM socket: Host is down

(although, when i do a l2ping, the second machine gets replies from the first).

Questions
======
1. what would be the best architecture for implementing bluetooth remote control?
2. is it possible to configure the accept function to return connection specific ports?
3. what do i need to get the bluetooth serial port working?

pls. let me know.

thanks in advance,
dave

---------------------------------
Love cheap thrills? Enjoy PC-to-Phone calls to 30+ countries for just 2¢/min with Yahoo! Messenger with Voice.

#1 lore raw

Hi
well... there is this video by Anil Dhawan which actually implemented in windows CE os I guess... probably u can look into the video to know more... He used COM ports get it working.. just look at his video... may be it rings a bell... (just give Anil Dhawan + Bluetooth in Google)

Quoted 76 lines · deva seetharam

hello all,
i am building bluetooth based handheld remote control devices.

background information
===============
the remote control devices are based on LMX9820 (National Semiconductor's single-chip bluetooth modules). when buttons are pressed, these devices send messages to an application running on a debian linux box. bluetooth connectivity is added to this linux box using D-Link DBT-120 bluetooth dongle.

attempted architectures
==============
i tried to implement this system using the following architectures:

1. RFCOMM server
the linux box runs a bluetooth socket server on a particular channel. the remote control device connects to the server over the specific channel and sends messages.

problems encountered: multiple remotes can't connect to the same server.

i see that the accept method (unlike tcp implementation) returns the server port upon accepting an incoming connection. for instance, if the server is listening on port 16, when any remote connects to the server, the server port 16 is used to establish end-to-end connection with the client. now, another device cannot connect to the same server until the first remote disconnects. this problem stops us from using multiple remotes with a single linux server.

2. Serial port
set up one or more bluetooth serial ports and the remote control devices can send messages to anyone of them by randomly selecting one of those channels.

so i setup a port as listed by rfcomm show:
rfcomm0: 00:0D:88:C0:61:55 channel 16 clean

Quoted 1 line

sdptool add --channel=16 sp

Serial Port service registered

Quoted 1 line

rfcomm listen 0 16

Waiting for connection on channel 16

i tried to connect to rfcomm0 from a *different* linux machine.

problems encountered: can't connect...

Quoted 1 line

rfcomm connect 00:0D:88:C0:61:55 16

Can't connect RFCOMM socket: Host is down

(although, when i do a l2ping, the second machine gets replies from the first).

Questions
======
1. what would be the best architecture for implementing bluetooth remote control?
2. is it possible to configure the accept function to return connection specific ports?
3. what do i need to get the bluetooth serial port working?

pls. let me know.

thanks in advance,
dave

------------------------------
Love cheap thrills? Enjoy PC-to-Phone calls to 30+ countries<http://us.rd.yahoo.com/mail_us/taglines/postman9/*http://us.rd.yahoo.com/evt=39666/*http://beta.messenger.yahoo.com/>for just 2¢/min with Yahoo! Messenger with Voice.

#2 lore raw

thank you for the pointer. you can find the video at the following site:
http://www.windowsfordevices.com/news/NS5107313610.html

Sowmya Gattupalli <[email protected]> wrote: Hi
well... there is this video by Anil Dhawan which actually implemented in windows CE os I guess... probably u can look into the video to know more... He used COM ports get it working.. just look at his video... may be it rings a bell... (just give Anil Dhawan + Bluetooth in Google)

On 4/12/06, deva seetharam <[email protected] > wrote:hello all,
i am building bluetooth based handheld remote control devices.

background information
===============
the remote control devices are based on LMX9820 (National Semiconductor's single-chip bluetooth modules). when buttons are pressed, these devices send messages to an application running on a debian linux box. bluetooth connectivity is added to this linux box using D-Link DBT-120 bluetooth dongle.

attempted architectures
==============
i tried to implement this system using the following architectures:

1. RFCOMM server
the linux box runs a bluetooth socket server on a particular channel. the remote control device connects to the server over the specific channel and sends messages.

problems encountered: multiple remotes can't connect to the same server.

i see that the accept method (unlike tcp implementation) returns the server port upon accepting an incoming connection. for instance, if the server is listening on port 16, when any remote connects to the server, the server port 16 is used to establish end-to-end connection with the client. now, another device cannot connect to the same server until the first remote disconnects. this problem stops us from using multiple remotes with a single linux server.

2. Serial port
set up one or more bluetooth serial ports and the remote control devices can send messages to anyone of them by randomly selecting one of those channels.

so i setup a port as listed by rfcomm show:
rfcomm0: 00:0D:88:C0:61:55 channel 16 clean

Quoted 1 line

sdptool add --channel=16 sp

Serial Port service registered

Quoted 1 line

rfcomm listen 0 16

Waiting for connection on channel 16

i tried to connect to rfcomm0 from a *different* linux machine.

problems encountered: can't connect...

Quoted 1 line

rfcomm connect 00:0D:88:C0:61:55 16

Can't connect RFCOMM socket: Host is down

(although, when i do a l2ping, the second machine gets replies from the first).

Questions
======
1. what would be the best architecture for implementing bluetooth remote control?
2. is it possible to configure the accept function to return connection specific ports?
3. what do i need to get the bluetooth serial port working?

pls. let me know.

thanks in advance,
dave

---------------------------------
Love cheap thrills? Enjoy PC-to-Phone calls to 30+ countries for just 2¢/min with Yahoo! Messenger with Voice.

---------------------------------
Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls. Great rates starting at 1&cent;/min.

#3 lore raw
In reply to deva seetharam

Take a look at Xbtrc

http://wwwhome.cs.utwente.nl/~dijkhw/index.php?p=Katlijk/Xbtrc

problems encountered: multiple remotes can't connect to the same server.

Quoted 9 lines

i see that the accept method (unlike tcp implementation) returns the server port upon accepting an incoming connection. for instance, if the server is listening on port 16, when any remote connects to the server, the server port 16 is used to establish end-to-end connection with the client. now, another device cannot connect to the same server until the first remote disconnects. this problem stops us from using multiple remotes with a single linux server.

There is no such restriction in hardware or bluetooth software stack. Multiple clients can be simultaneously connected to the same RFCOMM channel on a server. Use hcidump -X -V to find out where the connection fails. Make sure that the server is always the master and that the clients are always the slaves. This probably requires a role switch after each connect.

Quoted 3 lines
Quoted 1 line

rfcomm connect 00:0D:88:C0:61:55 16

Can't connect RFCOMM socket: Host is down

This syntax is incorrect. See the rfcomm documentation.

-albert